<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<html>
<head>
<%@ include file="common.jsp"%>
<title><%=proName%></title>
<link type="text/css" rel="stylesheet" href="<%=rootPath%>/css/manage/selectResult.css" />
<script type="text/javascript" src="<%=rootPath%>/js/manage/wxMaterialManageNews.js"></script>
</head>

<body>
	<input type="hidden" id="appid" value="${appid }"/>
	<jsp:include page="./menu.jsp"></jsp:include>
	<div id="body">
		<div id="navTop">
			<div class="bg_left"></div>
			<div class="bg_main"></div>
			<div class="bg_right"></div>
		</div>
		<div id="userManager">
			<table width="100%" cellpadding="0" cellspacing="0" border="0"
				class="maintable">
				<tr>
					<th colspan="4" align="left" valign="middle">
						<table cellpadding="0" cellspacing="0">
							<tr>
								<th><span id="search_icon" class="search_icon"></span></th>
								<th height="30px"><span style="margin-left: 2px;">素材管理</span>
								</th>
							</tr>
						</table>
					</th>
				</tr>
				<tr>
					<td colspan="4" align="left" valign="middle">
						<table cellpadding="0" cellspacing="0">
							<tr>
								<th height="30px"><input id="tab_news" type="button"
									onclick="goToManagePage('${appid}')"
									class="ui-button ui-widget ui-state-default ui-corner-all"
									role="button" aria-disabled="false" value="图文消息"
									onmouseover="this.style.background='#FFF18B'"
									onmouseout="this.style.background='#F1EDD2'"
									style="background: #FFF18B" /></th>
<!-- 								<th height="30px"><input id="tab_image" type="button" -->
<!-- 									onclick="addManyArticles()" -->
<!-- 									class="ui-button ui-widget ui-state-default ui-corner-all" -->
<!-- 									role="button" aria-disabled="false" value="图片库" -->
<!-- 									onmouseover="this.style.background='#FFF18B'" -->
<!-- 									onmouseout="this.style.background='#F1EDD2'" disabled="disabled"/></th> -->
<!-- 								<th height="30px"><input id="reset" type="button" -->
<!-- 									onclick="addManyArticles()" -->
<!-- 									class="ui-button ui-widget ui-state-default ui-corner-all" -->
<!-- 									role="button" aria-disabled="false" value="语音" -->
<!-- 									onmouseover="this.style.background='#FFF18B'" -->
<!-- 									onmouseout="this.style.background='#F1EDD2'" disabled="disabled"/></th> -->
<!-- 								<th height="30px"><input id="reset" type="button" -->
<!-- 									onclick="addManyArticles()" -->
<!-- 									class="ui-button ui-widget ui-state-default ui-corner-all" -->
<!-- 									role="button" aria-disabled="false" value="视频" -->
<!-- 									onmouseover="this.style.background='#FFF18B'" -->
<!-- 									onmouseout="this.style.background='#F1EDD2'" disabled="disabled"/></th> -->
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td>
						<table id="newRule" class="maintable" width="95%"
							cellpadding="0px" cellspacing="25px"
							style="margin-bottom: 20px;float: left;">
							<tr>
								<td id="" valign="top" style="width: 33%">

									<table id="newRule" class="maintable" width="100%"
										cellpadding="0px" cellspacing="25px"
										style="margin-left: auto; margin-bottom: 20px;">
										<tr>
											<td id="col_1" valign="top" style="width: 33%" align="center">
												<table id="newRule" class="maintable" width="100%"
													style="margin-left: 3%; border: 1px #ccc solid; margin-bottom: 20px;">
													<tr style="height: 80px;">
														<td align="center"><input id="addSingleNews"
															type="button" onclick="addMaterial()"
															class="ui-button ui-widget ui-state-default ui-corner-all"
															role="button" aria-disabled="false" value="+ 添加图文"
															onmouseover="this.style.background='#FFF18B'"
															onmouseout="this.style.background='#F1EDD2'" /></td>
													</tr>
												</table>
												<c:forEach items="${list}" var="material" varStatus="s">
													<c:if test="${s.index%3==0 }">
														<table class="maintable" width="100%" style="margin-left: 3%; border: 1px #ccc solid; margin-bottom: 20px;background: rgb(242, 240, 218);">
															<c:forEach items="${material.articleList}" var="article" varStatus="a">
																<c:if test="${article.order == 0 }">
																	<tr style="height: 174px;">
																		<th colspan="2" style="width: 100%; height: 174px; border-bottom: 1px solid #ccc;">
																			<div style="height: 174px; width: 100%; overflow: hidden; position: relative;">
																				<img class="item_img" src="<%=rootPath%>${article.picUrl}" />
																				<div style="height: 30px; background: black; filter: alpha(opacity = 50); opacity: 0.6; position: absolute; left: 0; bottom: 0; width: 100%;">
																					<h2 style="color: white; text-align: left; padding-left: 15px; line-height: 30px;">${article.title }</h2>
																				</div>
																			</div>
																		</th>
																	</tr>
																</c:if>
																<c:if test="${article.order != 0 }">
																	<tr style="height: 80px;">
																		<td style="border-bottom: 1px solid #ccc;">
																			<h2>${article.title }</h2></td>
																		<td width="30%" style="border-bottom: 1px solid #ccc;height: 80px;">
																			<img class="item_img" src="<%=rootPath%>${article.picUrl}"/>
																		</td>
																	</tr>
																</c:if>
															</c:forEach>
															<tr style="height: 30px;">
																<td colspan="2" align="center"><input
																	type="button" onclick="editMaterial('${material.id}')"
																	class="ui-button ui-widget ui-state-default ui-corner-all"
																	role="button" aria-disabled="false" value="编辑"
																	onmouseover="this.style.background='#FFF18B'"
																	onmouseout="this.style.background='#F1EDD2'" /> <input
																	type="button" onclick="deleteMaterial('${material.id}')"
																	class="ui-button ui-widget ui-state-default ui-corner-all"
																	role="button" aria-disabled="false" value="删除"
																	onmouseover="this.style.background='#FFF18B'"
																	onmouseout="this.style.background='#F1EDD2'" /></td>
															</tr>
														</table>
													</c:if>
												</c:forEach>
												
											</td>
											<td id="col_2" valign="top" align="center" style="width: 33%">
												<c:forEach items="${list}" var="material" varStatus="s">
													<c:if test="${s.index%3==1 }">
														<table class="maintable" width="100%" style="margin-left: 3%; border: 1px #ccc solid; margin-bottom: 20px;background: rgb(242, 240, 218);">
															<c:forEach items="${material.articleList}" var="article" varStatus="a">
																<c:if test="${article.order == 0 }">
																	<tr style="height: 174px;">
																		<th colspan="2" style="width: 100%; height: 174px; border-bottom: 1px solid #ccc;">
																			<div style="height: 174px; width: 100%; overflow: hidden; position: relative;">
																				<img class="item_img" src="<%=rootPath%>${article.picUrl}" />
																				<div style="height: 30px; background: black; filter: alpha(opacity = 50); opacity: 0.6; position: absolute; left: 0; bottom: 0; width: 100%;">
																					<h2 style="color: white; text-align: left; padding-left: 15px; line-height: 30px;">${article.title }</h2>
																				</div>
																			</div>
																		</th>
																	</tr>
																</c:if>
																<c:if test="${article.order != 0 }">
																	<tr style="height: 80px;">
																		<td style="border-bottom: 1px solid #ccc;">
																			<h2>${article.title }</h2></td>
																		<td width="30%" style="border-bottom: 1px solid #ccc;height: 80px;">
																			<img class="item_img" src="<%=rootPath%>${article.picUrl}" />
																		</td>
																	</tr>
																</c:if>
															</c:forEach>
															<tr style="height: 30px;">
																<td colspan="2" align="center"><input
																	type="button" onclick="editMaterial('${material.id}')"
																	class="ui-button ui-widget ui-state-default ui-corner-all"
																	role="button" aria-disabled="false" value="编辑"
																	onmouseover="this.style.background='#FFF18B'"
																	onmouseout="this.style.background='#F1EDD2'" /> <input
																	type="button" onclick="deleteMaterial('${material.id}')"
																	class="ui-button ui-widget ui-state-default ui-corner-all"
																	role="button" aria-disabled="false" value="删除"
																	onmouseover="this.style.background='#FFF18B'"
																	onmouseout="this.style.background='#F1EDD2'" /></td>
															</tr>
														</table>
													</c:if>
												</c:forEach>
											</td>
											<td id="col_3" valign="top" align="center" style="width: 33%">
												<c:forEach items="${list}" var="material" varStatus="s">
													<c:if test="${s.index%3==2 }">
														<table class="maintable" width="100%" style="margin-left: 3%; border: 1px #ccc solid; margin-bottom: 20px;background: rgb(242, 240, 218);">
															<c:forEach items="${material.articleList}" var="article" varStatus="a">
																<c:if test="${article.order == 0 }">
																	<tr style="height: 174px;">
																		<th colspan="2" style="width: 100%; height: 174px; border-bottom: 1px solid #ccc;">
																			<div style="height: 174px; width: 100%; overflow: hidden; position: relative;">
																				<img class="item_img" src="<%=rootPath%>${article.picUrl}" />
																				<div style="height: 30px; background: black; filter: alpha(opacity = 50); opacity: 0.6; position: absolute; left: 0; bottom: 0; width: 100%;">
																					<h2 style="color: white; text-align: left; padding-left: 15px; line-height: 30px;">${article.title }</h2>
																				</div>
																			</div>
																		</th>
																	</tr>
																</c:if>
																<c:if test="${article.order != 0 }">
																	<tr style="height: 80px;">
																		<td style="border-bottom: 1px solid #ccc;">
																			<h2>${article.title }</h2></td>
																		<td width="30%" style="border-bottom: 1px solid #ccc;height: 80px;">
																			<img class="item_img" src="<%=rootPath%>${article.picUrl}" />
																		</td>
																	</tr>
																</c:if>
															</c:forEach>
															<tr style="height: 30px;">
																<td colspan="2" align="center"><input
																	type="button" onclick="editMaterial('${material.id}')"
																	class="ui-button ui-widget ui-state-default ui-corner-all"
																	role="button" aria-disabled="false" value="编辑"
																	onmouseover="this.style.background='#FFF18B'"
																	onmouseout="this.style.background='#F1EDD2'" /> <input
																	type="button" onclick="deleteMaterial('${material.id}')"
																	class="ui-button ui-widget ui-state-default ui-corner-all"
																	role="button" aria-disabled="false" value="删除"
																	onmouseover="this.style.background='#FFF18B'"
																	onmouseout="this.style.background='#F1EDD2'" /></td>
															</tr>
														</table>
													</c:if>
												</c:forEach>
												
											</td>
										</tr>
									</table> <!-- tianjia guize biao end -->

								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			<div id="pagernav"></div>
			<div id="rolesDialog" style="display: none; height: 300px">
				<div id="treeScroll">
					<div id="treebox_group"></div>
				</div>
			</div>
		</div>
	</div>
	<jsp:include page="./footer.jsp"></jsp:include>
</body>

</html>
